package net.tensor.skynet.api.controller

import net.tensor.skynet.common.user.entity.Result
import net.tensor.skynet.common.user.entity.User
import org.springframework.web.bind.annotation.*

@RestController
@RequestMapping("/")
class HelloController {

    @PostMapping
    fun helloTestPost(@RequestBody user: User): User {
        println(user.toString())
        return user
    }

    @GetMapping("/{name}")
    fun helloTestGet(@PathVariable name: String): Result = Result("Hello $name")
}